<template>
  <div>
    <div class="son1">
      <h1>我是子组件MySon1</h1>
      <button @click="clickHandler">我给父组件送一辆法拉利</button>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  methods: {
    clickHandler() {
      this.$emit("car", "法拉利，大奔，兰博基尼");
    },
  },
};
</script>

<style scoped>
.son1 {
  width: 400px;
  height: 200px;
  background: hotpink;
  margin: 50px;
}
</style>